namespace MyDotnetApi.Application;

public interface IMyService {
  string SayHello(string name);
}
public class MyService : IMyService
{
    public string SayHello(string name)
    {
        return $"Hello, {name}!";
    }
}

/// <summary>
/// testApi
/// </summary>
[Route("api/testApi")]
[ApiController]
public class TestApiController : ControllerBase
{
  private IMyService _service;
  private MyConfig _config;
  public TestApiController(IMyService service){
    _service = service;
    _config = App.GetConfig<MyConfig>("MyConfig");
  } 
    [HttpGet, NonUnify]
    public string TestApi([MinLength(3)] string name)
    {
        return $"Hello {name} with {_service.SayHello(name)} : {_config.MinValue}";
    }
}
